package pl.skubicha.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import pl.skubicha.domain.Users;
import pl.skubicha.exceptions.EntityConstraintException;
import pl.skubicha.exceptions.UserNotFoundException;
import pl.skubicha.response.UserDTO;

public interface UserService {

	public List< Users > findAllTeachers();

	public Page< Users > findAllTeachers( Pageable page );

	public Page< Users > findAllTeachersMatching( String searchString, Pageable page );

	public List< Users > findAllStudents();

	public Page< Users > findAllStudents( Pageable page );

	public Page< Users > findAllStudentsMatching( String searchString, Pageable page );

	public Page< Users > findAllStudentsInGroup( Integer id, Pageable page );

	public List< Users > findAllStudentsInGroup( Integer id );
	
	public List< Users > findAllStudentsInGroupAndSubject( Integer idGroup, Integer idSubject );

	public Users findById( Integer id ) throws UserNotFoundException;

	public Users findByLogin( String login ) throws UserNotFoundException;

	public Users create( UserDTO created );

	public Users create( Users created );

	public Users update( UserDTO updated ) throws UserNotFoundException;

	public Users delete( Integer id ) throws UserNotFoundException, EntityConstraintException;

}
